import time
import redis

ip = '127.0.0.1'
password = ''
r = redis.StrictRedis('127.0.0.1',6379,0)
start = 0
while True:
    end = int(r.get("order_sum"))
    speed = end - start
    print(speed)
    r.set('speed',speed)
    start = end
    time.sleep(1)
